package com.itheima.reggie.service;

import com.itheima.reggie.entity.ShoppingCart;

import java.util.List;

public interface ShoppingCartService {
    /**
     * 添加购车
     * @param shoppingCart
     * @return ShoppingCart
     */
    ShoppingCart addCart(ShoppingCart shoppingCart);
    //查询用户购物车
    List<ShoppingCart> findAllByUserId(Long userId);

    /**
     * 清空购物车
     * @param userId
     * @return boolean
     */
    boolean deleteByUserId(Long userId);
}
